<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false" session="true"%>
<%@taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE html>
<html>
<head>
    <base href="<%=basePath%>">
    <title><s:message code="M_3720_TOOL_PM_PLAN_SETTING_TAG" /></title>
    <%@ include file="/page/comPage/comCSS.html"%>
    <%@ include file="/page/comPage/navbar.html"%>
    <style type="text/css">
    	.bootstrap-datetimepicker-widget {
    		z-index : 10000000;
    	}
    </style>
</head>
<body>
	<div class="container-fluid">
	    <div class="col-sm-12 btnDivCss">
	        <button class="btn btn-info" id="query_btn"><s:message code="QUERY_TAG" /></button>
			<button class="btn btn-primary" id="add_btn"><s:message code="ADD_TAG" /></button>
			<input id="select_btn"  type="file" class="form-control  file" accept=".xls,.xlsx" style="display: none" />
			<button class="btn btn-primary" id="import_btn">EXCEL<s:message code="IMPORT_TAG" /></button>
			<%--<button class="btn btn-warning" id="export_btn">EXCEL<s:message code="EXPORT_TAG" /></button>--%>
			<button class="btn btn btn-warning" id="download_btn">EXCEL<s:message code="IMPORT_STENCIL"/></button>
			<button class="btn btn-info" id="save_btn">保存导入计划</button>
	    </div>
	    <div class="col-sm-12" id="leftDiv">
		    <fieldset>
                <legend><s:message code="QUERY_CONDITION_TAG" /></legend>
            </fieldset>
	        <form  class="form-horizontal">
				<div class="form-group col-sm-3">
					<label class="control-label col-sm-4"
						   for="startIn"><s:message code="BEGIN_TIME_TAG" />从</label>
					<div class="col-sm-8">
						<%--<div id="startTimestamp" class="input-group input-append">--%>
						<%--<input data-format="yyyy-MM-dd hh:mm:ss" type="text" class="form-control" id="startIn">--%>
						<%--<span class="input-group-addon add-on">--%>
						<%--<i data-date-icon="glyphicon-calendar" class="glyphicon glyphicon-calendar glyphicon-time"></i>--%>
						<%--</span>--%>
						<%--</div>--%>
						<input id="startIn"  type="text" class="form-control">
					</div>
				</div>
				<div class="form-group col-sm-3">
					<label class="control-label col-sm-4"
						   for="endIn">至</label>
					<div class="col-sm-8">
						<%--<div  id="endTimestamp" class="input-group input-append">--%>
						<%--<input data-format="yyyy-MM-dd hh:mm:ss" type="text" class="form-control" id="endIn">--%>
						<%--<span class="input-group-addon add-on">--%>
						<%--<i data-date-icon="glyphicon-calendar" class="glyphicon glyphicon-calendar glyphicon-time"></i>--%>
						<%--</span>--%>
						<%--</div>--%>
						<input id="endIn"  type="text" class="form-control">
					</div>
				</div>
	            <div class="form-group col-sm-3">
					<label class="control-label col-sm-4" for="toolRunModeSel">
						<s:message code="TOOL_RUN_MODEL_TAG" />
					</label>
					<div class="col-sm-8">
						<select id="toolRunModeSel" class="form-control" style="width: 100%"></select>
					</div>
	            </div>
	            <div class="form-group col-sm-3">
					<label class="control-label col-sm-4" for="toolIdSel">
						<s:message code="TOOL_ID_TAG" />
					</label>
					<div class="col-sm-8">
						<select id="toolIdSel" class="form-control" style="width: 100%"></select>
					</div>
	            </div>
	            <div class="form-group col-sm-3">
					<label class="control-label col-sm-4" for="pmTypeSel">
						<s:message code="PM_TYPE_TAG" />
					</label>
					<div class="col-sm-8">
						<select id="pmTypeSel" class="form-control" style="width: 100%"></select>
					</div>
	            </div>
				<div class="form-group col-sm-3">
				<label class="control-label col-sm-4" for="bayIdSel"><s:message code="LINE_ID_TAG"/></label>
				<div class="col-sm-8">
					<select class="form-control" id="bayIdSel"></select>
				</div>
			</div>
	        </form>
		</div>
		<div class="col-sm-12" id="divTop">
		    <fieldset>
                <legend><s:message code="PM_PLAN_SET_LIST_TAG" /></legend>
            </fieldset>
			<div id="pmSetListDiv">
				<table id="pmSetListGrd" style="height: 1px;"></table>
				<div id="pmSetListPg"></div>
			</div>
		</div>
	</div>
	<!-- 保养计划新增&修改 Dialog -->
	<div id="PMPlanDialog" class="modal fade" role="dialog" aria-labelledby="title" aria-hidden="true">
		<div id="PMPlanModal" class="modal-dialog" style="width:85%">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h3 class="modal-title">
						<span id="PMPlanDialog_titleTxt" class="help-inline"></span>
                       </h3>
				</div>
				<!--Modal header-->
				<div class="modal-body">
					<form id="PMPlanDialog_dataCateForm" class="form-horizontal row">
						<span id="PMPlanDialog_pmSeqIdSpan" hidden></span>
						<div class="row">
						<div class="col-sm-3" id="nowPmDate">
							<label class="control-label col-sm-4" for="PMPlanDialog_pmDateDatepicker">
								当前保养开始日期
							</label>
							<div class="col-sm-8">
								<input id="PMPlanDialog_pmDateDatepicker"   type="text" class="form-control" disabled/>
							</div>
						</div>

							<div class="col-sm-3" id="nowPmShiftIdFk">
								<label class="control-label col-sm-4" for="nowPmShift_id_fk">
									当前班别
								</label>
								<div class="col-sm-8">
									<input id="nowPmShift_id_fk"   type="text" class="form-control" disabled/>
								</div>
							</div>

						<%--<div class="col-sm-3" id="endPmDate">--%>
							<%--<label class="control-label col-sm-4" for="PMPlanDialog_pmEndDateDatepicker">--%>
								<%--当前保养结束日期--%>
							<%--</label>--%>
							<%--<div class="col-sm-8">--%>
								<%--<input id="PMPlanDialog_pmEndDateDatepicker"   type="text" class="form-control" disabled/>--%>
							<%--</div>--%>
						<%--</div>--%>
						</div>
						<div class="row">
						<div class="col-sm-3">
							<label class="control-label col-sm-4" for="pmUpdateDate">
								计划开始日期
							</label>
							<div class="col-sm-8">
									<input id="pmUpdateDate"  type="text" class="form-control">
							</div>
						</div>
							<div class="col-sm-3">
								<label class="control-label col-sm-4" for="plan_duration">
									计划时长
								</label>
								<div class="col-sm-8">
									<input id="plan_duration"  type="text" class="form-control">
								</div>
							</div>
					<%--	<div class="col-sm-3">
							<label class="control-label col-sm-4" for="pmEndDate">
								计划结束日期
							</label>
							<div class="col-sm-8">
									<input id="pmEndDate" type="text" class="form-control">
							</div>
						</div>--%>

						<div class="col-sm-3">
							<label class="control-label col-sm-4" for="shift_id_fk">
								班别
							</label>
							<div class="col-sm-8">
								<select id="shift_id_fk" class="form-control"></select>
							</div>
						</div>


						<%--<div class="col-sm-3">--%>
							<%--<label class="control-label col-sm-4" for="PMPlanDialog_fabIdSel">--%>
								<%--厂别--%>
							<%--</label>--%>
							<%--<div class="col-sm-8">--%>
								<%--<select id="PMPlanDialog_fabIdSel" class="form-control"></select>--%>
							<%--</div>--%>
						<%--</div>--%>

						<div class="col-sm-3">
							<label class="control-label col-sm-4" for="PMPlanDialog_lineIdSel">
								线别
							</label>
							<div class="col-sm-8">
								<select id="PMPlanDialog_lineIdSel" class="form-control"></select>
							</div>
						</div>
						</div>

						<div class="row">
						<div class="col-sm-3">
							<label class="control-label col-sm-4" for="PMPlanDialog_toolIdSel">
								<s:message code="TOOL_ID_TAG" />
							</label>
							<div class="col-sm-8">
								<select id="PMPlanDialog_toolIdSel" class="form-control"></select>
							</div>
						</div>

						<div class="col-sm-3">
							<label class="control-label col-sm-4" for="PMPlanDialog_pmTypeSel">
								<s:message code="PM_TYPE_TAG" />
							</label>
							<div class="col-sm-8">
								<select id="PMPlanDialog_pmTypeSel" class="form-control"></select>
							</div>
						</div>

						<div class="col-sm-3">
							<label class="control-label col-sm-4" for="maintenance_master">
								保养主负责人
							</label>
							<div class="col-sm-8">
								<input id="maintenance_master"  type="text" class="form-control">
							</div>
						</div>

						<div class="col-sm-3">
							<label class="control-label col-sm-4" for="tech_confirm_flg">
								是否需要工艺确认
							</label>
							<div class="col-sm-8">
								<select id="tech_confirm_flg" class="form-control"></select>
							</div>
						</div>
						</div>

						<div class="col-sm-3">
							<label class="control-label col-sm-4" for="prod_confirm_flg">
								是否需要生产确认
							</label>
							<div class="col-sm-8">
								<select id="prod_confirm_flg" class="form-control"></select>
							</div>
						</div>

					</form>
					<form class="form-horizontal row">
						<div class="col-sm-12" >
						    <fieldset>
				                <legend><s:message code="PM_PLAN_ITEM_LIST_TAG" /></legend>
				            </fieldset>
							<button class="btn btn-primary" id="PMPlanDialog_addBtn"><s:message code="ADD_TAG" />保养项目</button>
							<div id="pmItemListDiv">
								<table id="pmItemListGrd"></table>
								<div id="pmItemListPg"></div>
							</div>
						</div>
					</form>
				</div>
				<!--Modal body-->
				<div class="modal-footer">
					<a id="PMPlanDialog_cancelBtn" class="btn" data-dismiss="modal"> <s:message code="CANCEL_TAG" /></a>
					<a id="PMPlanDialog_saveBtn" class="btn btn-primary"> <s:message code="SAVE_TAG" /></a>
					<a id="PMPlanDialog_deleteBtn" class="btn btn-danger"> <s:message code="DELETE_TAG" /></a>
					<label class="radio-inline">
					  <input type="radio" name="inlineRadioOptions" id="PMPlanDialog_currentBtn" value="C"> 本次保养
					</label>
					<label class="radio-inline">
					  <input type="radio" name="inlineRadioOptions" id="PMPlanDialog_allBtn" value="A"> 周期保养
					</label>
				</div>
				<!--Modal footer-->
			</div>
		</div>
	</div>
	
	<!-- 保养项目新增&修改 Dialog -->
	<div id="PMItemDialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="title" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h3 class="modal-title">
						<span id="PMItemDialog_titleTxt" class="help-inline"></span>
                       </h3>
				</div>
				<!--Modal header-->
				<div class="modal-body">
					<form id="PMItemDialog_dataCateForm" class="form-horizontal row">
						<label class="control-label col-sm-4 keyClass" for="PMItemDialog_pmTypeTxt">
							<s:message code="PM_TYPE_TAG" />
						</label>
						<div class="col-sm-6">
							<input type="text" id="PMItemDialog_pmTypeTxt" class="form-control"/>
						</div>
						<label class="control-label col-sm-4 keyClass" for="PMItemDialog_dataDscTxt">
							<s:message code="PM_DATA_DSC_TAG" />
						</label>
						<div class="col-sm-6">
							<input type="text" id="PMItemDialog_dataDscTxt" class="form-control"/>
						</div>
						<label class="control-label col-sm-4" for="PMItemDialog_uSpecTxt">
							<s:message code="U_SPEC_TAG" />
						</label>
						<div class="col-sm-6">
							<input type="text" id="PMItemDialog_uSpecTxt" class="form-control numberCss"/>
						</div>
						<label class="control-label col-sm-4" for="PMItemDialog_lSpecTxt">
							<s:message code="L_SPEC_TAG" />
						</label>
						<div class="col-sm-6">
							<input type="text" id="PMItemDialog_lSpecTxt" class="form-control numberCss"/>
						</div>
						<label class="control-label col-sm-4" for="PMItemDialog_dataTypeSel">
							<s:message code="DATA_TYPE_TAG" />
						</label>
						<div class="col-sm-6">
							<select id="PMItemDialog_dataTypeSel" class="form-control">
								<option value="数值">数值</option>
								<option value="文本">文本</option>
							</select>
						</div>
						<label class="control-label col-sm-4" for="PMItemDialog_sampleQtyTxt">
							<s:message code="SAMPLE_QTY_TAG" />
						</label>
						<div class="col-sm-6">
							<input type="text" id="PMItemDialog_sampleQtyTxt" class="form-control"/>
						</div>
                        <label class="control-label col-sm-4 keyClass" for="PMItemDialog_toolPmNoteTxt">
                            <s:message code="TOOL_PM_NOTE_TAG" />
                        </label>
                        <div class="col-sm-6">
                            <input type="text" id="PMItemDialog_toolPmNoteTxt" class="form-control" />
                        </div>
					</form>
				</div>
				<!--Modal body-->
				<div class="modal-footer">
					<a id="PMItemDialog_cancelBtn" class="btn" data-dismiss="modal"> <s:message code="CANCEL_TAG" />
					</a> <a id="PMItemDialog_saveBtn" class="btn btn-primary"> <s:message code="SURE_TAG" />
					</a>
				</div>
				<!--Modal footer-->
			</div>
		</div>
	</div>
	<%@ include file="/page/comPage/comJS.html"%>
	<script src="lib/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
	<script src="lib/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
	<script src="lib/laydate/laydate.js"></script>
	<script src="js/page/3000/3720.js?v=2016110801"></script>
	<script src="lib/fileinput/js/xlsx.full.min.js"></script>
	<script src="lib/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
</body>
</html>